﻿CREATE VIEW [steve].[uvSteve_ContentRevision]
	AS 

select c.ContentId
	, c.ContentTypeName
	, c.CreateDate
	, c.CreateMembershipId
	, c.ExternalId
	, c.SiteUrlId
	, c.[Language]
	, c.LatestRevisionNumber
	, c.LatestApprovedRevisionNumber
	, c.[Path]
	, c.SystemName

	, cr.Author
	, cr.ApprovalDate
	, cr.ApprovalMembershipId
	, cr.ContentDataId
	, cr.Height
	, cr.MimeSubtype
	, cr.MimeType
	, cr.PublicationDate
	, cr.Publisher
	, cr.PublisherUrlId
	, cr.Teaser
	, cr.ThumbnailContentId
	, cr.Title
	, cr.Width

	, cr.RevisionNumber
	, cr.RevisionComment
	, cr.RevisionDate
	, cr.RevisionMembershipId

	, su.SiteName
	, su.Url
	, su.IsSecure
	, s.DefaultAuthority

from steve.Content c
	inner join steve.ContentRevision cr on cr.ContentId = c.ContentId
	left join uvSteve_SiteUrlLatest su on su.SiteUrlId = c.SiteUrlId
	left join [Site] s on s.SiteName = su.SiteName

